package JLB_Chapter_10;

import java.util.*;

public class code_10_04 {
    public static void main(String[] args) {
        // Map<String, String> map = new HashMap<>();
        Map<String, String> map = new TreeMap<>();
        map.put("ISBN-978654", "Java从入门到精通");
        map.put("ISBN-978361", "Android从入门到精通");
        map.put("ISBN-978893", "21天学Android");
        map.put("ISBN-978756", "21天学Java");
        Set<String> set = map.keySet();
        Iterator<String> it = set.iterator();
        System.out.println("key值：");
        while (it.hasNext()) {
            System.out.print(it.next() + "\t");
        }
        Collection<String> collection = map.values();
        it = collection.iterator();
        System.out.println("\nvalues值：");
        while (it.hasNext()) {
            System.out.println(it.next() + "\t");
        }
    }
}
